//
//  MPBankBindSuccessController.m
//  MarkPlatform
//
//  Created by xiao6 on 2018/3/9.
//  Copyright © 2018年 AT. All rights reserved.
//

#import "MPBankBindSuccessController.h"

@interface MPBankBindSuccessController () {
    UIImage *_showImage;
}

@end

@implementation MPBankBindSuccessController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self showNavTitle:nil backItem:YES];
    [self setNavRightItemWithTitle:@"完成" color:[UIColor appColor] action:@selector(goBack)];
    self.disableDragBack = YES;
    
    UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, NAVI_HIGHT, SCREEN_WIDTH, 106)];
    view.backgroundColor = [UIColor whiteColor];
    [self.view addSubview:view];
    
    UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"icon_chenggong"]];
    [view addSubview:imageView];
    [imageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(imageView.superview);
        make.top.equalTo(imageView.superview).offset(15.0f);
    }];
    
    UILabel *label = [[UILabel alloc] init];
    label.font = [UIFont systemFontOfSize:18.0f];
    label.textColor = [UIColor blackColor];
    label.text = @"添加成功";
    [view addSubview:label];
    [label mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(label.superview);
        make.top.equalTo(imageView.mas_bottom).offset(19.0f);
    }];
}
- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    _showImage = [self.navigationController.navigationBar shadowImage];
    [self.navigationController.navigationBar setShadowImage:[UIImage new]];
}
- (void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];
    [self.navigationController.navigationBar setShadowImage:_showImage];
}
- (void)goBack {
    [self.navigationController popToViewController:[self.navigationController.viewControllers secondObject] animated:YES];
}
@end
